<#include "/admin/inc/page.html">
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>日志 - UnaBoot</title>
    <link rel="icon" href="${una}/ub-admin/img/favicon.png" type="image/x-icon">
    <link rel="shortcut icon" href="${una}/ub-admin/img/favicon.png" type="image/x-icon">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <link rel="stylesheet" href="${una}/ub-admin/plugin/fontawesome-free/css/all.min.css">
    <link rel="stylesheet" href="${una}/ub-admin/css/font-awesome.css">
    <link rel="stylesheet" href="${una}/ub-admin/css/ionicons.css">
    <link rel="stylesheet" href="${una}/ub-admin/css/adminlte.css">
    <link rel="stylesheet" href="${una}/ub-admin/plugin/layer/skin/default/layer.css">
    <link rel="stylesheet" href="${una}/ub-admin/css/unaboot-admin.css">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700">
</head>
<body class="sidebar-mini layout-fixed layout-navbar-fixed text-md <!--sidebar-collapse-->">
    <div class="wrapper">
        <nav class="main-header navbar navbar-expand navbar-white navbar-light">
            <#include "/admin/inc/header.html">
        </nav>
        <aside class="main-sidebar sidebar-dark-primary ">
            <#include "/admin/inc/aside.html">
        </aside>
        <div class="content-wrapper bg-gray-custom">
            <div class="content-header pb-0">
                <div class="row mb-2">
                    <div class="col-12">
                        <h4 class="ml-2 mb-0 text-dark">日志</h4>
                    </div>
                </div>
            </div>
            <div class="content">
                <div class="container-fluid">
                    <!--数据列表-->
                    <div class="row text-sm mt-1">
                        <div class="col-12">
                            <table class="table post-datatable table-striped table-hover" style="border: 1px solid #ddd">
                                <thead>
                                    <tr class="bg-white">
                                        <td width="30%">方法</td><td>类型</td><td>标题</td><td>IP</td><td>参数</td><td>URI</td><td>Error</td><td>日期</td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <#if data?? && data.content?size gt 0>
                                        <#list data.content as log>
                                            <tr>
                                                <td>
                                                    ${log.method}
                                                </td>
                                                <td>
                                                    ${log.type}
                                                    </td>
                                                <td>
                                                    ${log.title!''}
                                                <td>
                                                    ${log.ip}
                                                </td>
                                                <td>
                                                    <textarea class="form-control" rows="1" style="resize: none;text-align: left;">
                                                        ${log.params!''}
                                                    </textarea>
                                                </td>
                                                <td>
                                                    ${log.url!''}
                                                </td>
                                                <td>
                                                    ${log.error!''}
                                                </td>
                                                <td>
                                                    记录于<br>
                                                    <span class="post-time"><i class="fa fa-calendar-o"></i> ${log.createTime?string("yyyy-MM-dd")}</span>
                                                </td>
                                            </tr>
                                        </#list>
                                    <#else>
                                        <tr><td colspan="6" class="text-center text-secondary">暂无可用数据!</td></tr>
                                    </#if>
                                </tbody>
                                <tfoot>
                                    <tr class="bg-white">
                                        <td width="30%">方法</td><td>类型</td><td>标题</td><td>IP</td><td>参数</td><td>URI</td><td>Error</td><td>日期</td>
                                    </tr>
                                </tfoot>
                            </table>
                        </div>
                    </div>
                    <!--分页按钮-->
                    <div class="row text-sm mt-1">
                        <#if data?? && data.content?size gt 0 && data.totalPages gt 1>
                            <div class="col-12">
                                <nav aria-label="..." class="pull-right">
                                    <@pagination una+"/admin/logs/" data 9/>
                                </nav>
                            </div>
                        </#if>
                    </div>
                </div>
            </div>
        </div>
        <footer class="main-footer">
            <#include "/admin/inc/footer.html">
        </footer>
    </div>
    <script src="${una}/ub-admin/plugin/jquery/jquery.min.js" type="text/javascript"></script>
    <script src="${una}/ub-admin/plugin/bootstrap/js/bootstrap.bundle.min.js" type="text/javascript"></script>
    <script src="${una}/ub-admin/js/adminlte.js" type="text/javascript"></script>
    <script src="${una}/ub-admin/plugin/layer/layer.js"></script>
    <script src="${una}/ub-admin/js/unaboot-admin.core.js" type="text/javascript"></script>
</body>
</html>